/**
 * Created by JetBrains WebStorm.
 * User: Silence
 * Date: 3/18/12
 * Time: 9:44 AM
 * To change this template use File | Settings | File Templates.
 */

Ext.require(
    'Ext.Window.*'
);

Ext.define('EM.controller.event.TestPageController', {
    extend: 'Ext.app.Controller',
    views: ['event.TestPage', 'event.EventWindowView'],
    init: function() {
        var window = Ext.getCmp('eventwindow');
        if (!window) window = Ext.widget('eventwindow');
        window.hide();
        this.control({
            'viewport button[action=viewevent]': {
                click: function(button) {
                    //window = Ext.widget('eventwindow', {activeEvent: button.getId()});
                    window.showWithData(button);
                }
            }
        });
    }
});